<template>
  <el-dialog
    v-model="addDialogVisible"
    title="添加商家"
    width="600px"
    class="add-dialog-box-coupon"
    :before-close="CancelFUnc"
  >
    <el-form :model="addForm" label-width="100px" label-position="left">
      <el-form-item label="名称">
        <el-input class="add-input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="手机号">
        <el-input class="add-input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="密码">
        <el-input class="add-input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="分成比例">
        <el-input class="add-input-box" v-model="addForm.name">
          <template #suffix>%</template>
        </el-input>
      </el-form-item>
    </el-form>
    <template #footer>
      <div class="dialog-footer">
        <el-button class="btn-cancel" @click="CancelFUnc">取消</el-button>
        <el-button
          type="primary"
          @click="CancelFUnc"
          class="btn-submit"
        >
          确定
        </el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup>
import {
  computed,
  watch,
  onMounted,
  getCurrentInstance,
  ref,
  defineEmits,
  nextTick,
} from 'vue'
const { proxy: that } = getCurrentInstance()
const props = defineProps({
  show: {
    type: Boolean,
    default: () => {
      return false
    },
  },
  tableData: {
    type: Array,
    default: () => {
      return []
    },
  },
})

let addDialogVisible = ref(false)
let addForm = ref({
  radio: 1,
})
watch(
  () => props.show,
  (newValue, oldValue) => {
    addDialogVisible.value = props.show
  }
)
const emit = defineEmits(['onClose'])
const CancelFUnc = () => {
  emit('onClose', false)
}
const SubmitFUnc = () => {}
</script>
<style lang="scss">
@import './store_dislog.scss';
</style>